#include <QtWidgets/QMainWindow>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QListWidget>
#include <QGraphicsTextItem>
#include <QtCore>
#include "mainwindow.h"
#include "model/model.h"
#include "model/proxy_model.h"

MainWindow::MainWindow()
    :QMainWindow()
{
    createWidgets();
}

void MainWindow::createWidgets()
{
  QHBoxLayout *layout = new QHBoxLayout;

  view.setModel(&model);
  view.show();

  ProxyModel *proxyModel = new ProxyModel(this);
  proxyModel->setSourceModel(&model);

  tableView.setModel(proxyModel);

  layout->addWidget(&view);
  layout->addWidget(&tableView);
  QWidget *window = new QWidget();
  window->setLayout(layout);
  setCentralWidget(window);
}
